home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / workbench / workbench.h < prev   
C/C++ Source or Header  |  1996-09-10  |  5KB  |  182 lines

  1. #ifndef WORKBENCH_WORKBENCH_H
  2. #define WORKBENCH_WORKBENCH_H 1
  3. /*
  4. ** workbench.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/03/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for workbench.h
  17. */
  18. #ifndef AppIconPtr
  19. #define AppIconPtr ADDRESS
  20. #endif
  21. #ifndef AppMenuItemPtr
  22. #define AppMenuItemPtr ADDRESS
  23. #endif
  24. #ifndef AppMessagePtr
  25. #define AppMessagePtr ADDRESS
  26. #endif
  27. #ifndef AppWindowPtr
  28. #define AppWindowPtr ADDRESS
  29. #endif
  30. #ifndef DiskObjectPtr
  31. #define DiskObjectPtr ADDRESS
  32. #endif
  33. #ifndef DrawerDataPtr
  34. #define DrawerDataPtr ADDRESS
  35. #endif
  36. #ifndef FreeListPtr
  37. #define FreeListPtr ADDRESS
  38. #endif
  39. #ifndef OldDrawerDataPtr
  40. #define OldDrawerDataPtr ADDRESS
  41. #endif
  42. /*
  43. ** End of StructPointer defines for workbench.h
  44. */
  45.  
  46.  
  47. #ifndef EXEC_TYPES_H
  48. #include <exec/types.h>
  49. #endif
  50.  
  51. #ifndef EXEC_NODES_H
  52. #include <exec/nodes.h>
  53. #endif
  54.  
  55. #ifndef EXEC_LISTS_H
  56. #include <exec/lists.h>
  57. #endif
  58.  
  59. #ifndef EXEC_TASKS_H
  60. #include <exec/tasks.h>
  61. #endif
  62.  
  63. #ifndef INTUITION_INTUITION_H
  64. #include <intuition/intuition.h>
  65. #endif
  66.  
  67. #define WBDISK      1
  68. #define WBDRAWER    2
  69. #define WBTOOL      3
  70. #define WBPROJECT   4
  71. #define WBGARBAGE   5
  72. #define WBDEVICE    6
  73. #define WBKICK      7
  74. #define WBAPPICON   8
  75.  
  76. STRUCT OldDrawerData   /* pre V36 definition */
  77.     NewWindow dd_NewWindow    /* args to open window */
  78.     LONGINT        dd_CurrentX     /* current x coordinate of origin */
  79.     LONGINT        dd_CurrentY     /* current y coordinate of origin */
  80. END STRUCT 
  81. /* the amount of DrawerData actually written to disk */
  82. #define OLDDRAWERDATAFILESIZE   (SIZEOF(OldDrawerData))
  83.  
  84. STRUCT DrawerData  
  85.     NewWindow dd_NewWindow    /* args to open window */
  86.     LONGINT        dd_CurrentX     /* current x coordinate of origin */
  87.     LONGINT        dd_CurrentY     /* current y coordinate of origin */
  88.     LONGINT       dd_Flags    /* flags for drawer */
  89.     SHORTINT       dd_ViewModes    /* view mode for drawer */
  90. END STRUCT 
  91. /* the amount of DrawerData actually written to disk */
  92. #define DRAWERDATAFILESIZE  (SIZEOF(DrawerData))
  93.  
  94. STRUCT DiskObject  
  95.     SHORTINT       do_Magic  /* a magic number at the start of the file */
  96.     SHORTINT       do_Version  /* a version number,  so we can change it */
  97.     _Gadget do_Gadget   /* a copy of in core gadget */
  98.     BYTE        do_Type 
  99.     ADDRESS   do_DefaultTool 
  100.     ADDRESS   do_ToolTypes
  101.     LONGINT        do_CurrentX 
  102.     LONGINT        do_CurrentY 
  103.     DrawerDataPtr  do_DrawerData 
  104.     ADDRESS   do_ToolWindow   /* only applies to tools */
  105.     LONGINT        do_StackSize    /* only applies to tools */
  106.  
  107. END STRUCT 
  108.  
  109. #define WB_DISKMAGIC    &He310  /* a magic number,  not easily impersonated */
  110. #define WB_DISKVERSION  1   /* our current version number */
  111. #define WB_DISKREVISION 1   /* our current revision number */
  112. /* I only use the lower 8 bits of Gadget.UserData for the revision # */
  113. #define WB_DISKREVISIONMASK 255
  114.  
  115. STRUCT FreeList  
  116.     SHORTINT        fl_NumFree 
  117.     _List fl_MemList 
  118. END STRUCT 
  119.  
  120. /* workbench does different complement modes for its gadgets.
  121. ** It supports separate images,  complement mode,  and backfill mode.
  122. ** The first two are identical to intuitions GFLG_GADGIMAGE and GFLG_GADGHCOMP.
  123. ** backfill is similar to GFLG_GADGHCOMP,  but the region outside of the
  124. ** image (which normally would be color three when complemented)
  125. ** is flood-filled to color zero.
  126. */
  127. #define GFLG_GADGBACKFILL &H0001
  128. #define GADGBACKFILL      &H0001    /* an old synonym */
  129.  
  130. /* if an icon does not really live anywhere,  set its current position
  131. ** to here
  132. */
  133. #define NO_ICON_POSITION    (&H80000000)
  134.  
  135. /* workbench now is a library.  this is it's name */
  136. #define WORKBENCH_NAME      "workbench.library"
  137.  
  138. /* If you find am_Version >= AM_VERSION,  you know this structure has
  139.  * at least the fields defined in this version of the include file
  140.  */
  141. #define AM_VERSION  1
  142.  
  143. STRUCT AppMessage  
  144.     _Message am_Message   /* standard message structure */
  145.     SHORTINT am_Type       /* message type */
  146.     LONGINT am_UserData       /* application specific */
  147.     LONGINT am_ID         /* application definable ID */
  148.     LONGINT am_NumArgs         /* # of elements in arglist */
  149.     WBArgPtr  am_ArgList    /* the arguements themselves */
  150.     SHORTINT am_Version        /* will be AM_VERSION */
  151.     SHORTINT am_Class      /* message class */
  152.     SHORTINT am_MouseX      /* mouse x position of event */
  153.     SHORTINT am_MouseY      /* mouse y position of event */
  154.     LONGINT am_Seconds        /* current system clock time */
  155.     LONGINT am_Micros         /* current system clock time */
  156.     STRING am_Reserved SIZE 32  /* 8*SIZEOF(LONGINT) */   /* avoid recompilation */
  157. END STRUCT 
  158.  
  159. /* types of app messages */
  160. #define AMTYPE_APPWINDOW   7    /* app window message    */
  161. #define AMTYPE_APPICON     8    /* app icon message  */
  162. #define AMTYPE_APPMENUITEM 9    /* app menu item message */
  163.  
  164.  
  165. /*
  166.  * The following structures are private.  These are just stub
  167.  * structures for code compatibility...
  168.  */
  169. STRUCT  AppWindow    
  170.     ADDRESS   aw_PRIVATE 
  171. END STRUCT 
  172.  
  173. STRUCT  AppIcon      
  174.     ADDRESS   ai_PRIVATE 
  175. END STRUCT 
  176.  
  177. STRUCT      AppMenuItem  
  178.     ADDRESS   ami_PRIVATE 
  179. END STRUCT 
  180.  
  181. #endif  /* !WORKBENCH_WORKBENCH_H */
  182.